<?php
$_SESSION['detail'] = $detail['id'];
echo '<div id="xeco"><div style="text-align:center; width:100%; margin-bottom:15px;"><h2 style="font-size:26px; color:#3f0102"><img src="images/title1.gif" alt="" /> &nbsp; '.$menu['name'].' &nbsp; <img src="images/title2.gif" alt="" /></h2></div></div>';
$view = "<div id=\"viewpost\"><p class=\"date\">".date('H:i | d-m-Y', strtotime($detail['date_create']))."</p><h1>{$detail['name']}</h1><div style='margin-bottom:20px'>{$detail['content']}</div></div>";

$view .= '<div id="guiykien"><img src="images/nhatxetinfo.jpg" alt="nhận xét thông tin" /></div><div id="popupContact"><div id="formykien"><h4 style="color:#FFF000; font-size:16px; margin-bottom:5px">Bạn muốn hỏi gì?</h4><p><input type="text" name="name" value="Họ tên" maxlength="50" class="txt" /></p><p><input type="text" name="email" value="Email" maxlength="50" class="txt" /></p><p><textarea class="textarea" name="content"></textarea></p><p><input type="button" name="btnSub" value="Gửi" class="btn" /><input type="button" name="btnCancel" value="Hủy" class="btn" /></p><input type="hidden" name="id" value="'.$_POST['id'].'" /><input type="hidden" name="form" value="info_comment" /></div></div><div id="backgroundPopup"></div>';
$qr = mysql_query("SELECT content,name,date_create FROM info_comment WHERE `delete`=0 AND status=1 AND info_id='{$detail['id']}' ORDER BY date_update DESC");
if(mysql_num_rows($qr) > 0){
	$view .= "<div style='clear:both; color:#7A1416; font-size:16px; font-weight:bold; margin-top:30px'>Nhận xét khách hàng</div>";
	while($row = mysql_fetch_array($qr)){
		if(strtolower($row['name'])!='admin') $view .= "<div class=\"item_info\"><h5>{$row['name']} | ".date('H:i d/m/Y',strtotime($row['date_create']))."</h5><p>{$row['content']}</p></div>";
		else $view .= "<div class=\"item_info\"><h5 style='color:red'>{$row['name']} | ".date('H:i d/m/Y',strtotime($row['date_create']))."</h5><p>{$row['content']}</p></div>";
	}
	mysql_free_result($qr);
}
echo $view;
?>